package com.drojian.demo3;

import android.content.Intent;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.drojian.demo.R;
import com.drojian.demo3.multimedia.VideoActivity;
import com.drojian.demo3.service.music.MusicActivity;
import com.drojian.demo3.service.remote.RemoteServiceActivity;
import com.drojian.demo3.service.local.TestActivity1;


public class ServiceFragment extends Fragment {


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.part3_fragment_service, container, false);
        Button btn1 = view.findViewById(R.id.service_1);
        Button btn2 = view.findViewById(R.id.service_2);
        Button btn3 = view.findViewById(R.id.service_3);
        btn1.setOnClickListener(v->startActivity(new Intent(getContext(), TestActivity1.class)));
        btn2.setOnClickListener(v->startActivity(new Intent(getContext(), RemoteServiceActivity.class)));
        btn3.setOnClickListener(v->startActivity(new Intent(getContext(), VideoActivity.class)));
        return view;
    }

    public static ServiceFragment newInstance() {
        return new ServiceFragment();
    }

}